import request from '@/utils/request'

import {baseUrlConfig} from "@/config/config";
const basePath = baseUrlConfig.businessBaseUrl;
//获取分页列表
export const recycleUnitPageList: (data: any) => Promise<[]> = (data) => {
  return request({
    url: basePath + '/secure/recycleUnit/find/page',
    method: 'post',
    data
  })
}

//恢复
export const oneRecover = (data: any) => {
  return request({
    url: basePath + '/secure/recycleUnit/oneRecover?id='+data.id + '&isJudeg='+data.isJudeg,
    method: 'get'
  })
}

//清空
export const emptyRecover = () => {
  return request({
    url: basePath + '/secure/recycleUnit/emptyRecover',
    method: 'get'
  })
}
// 清空时间
export const selectSet = (data: any) => {
  return request({
    url: basePath + '/secure/recycleUnit/selectSet?pageType='+data.pageType,
    method: 'get'
  })
}
export const updateRecycleTime: (data: any) => Promise<[]> = (data) => {
  return request({
    url: basePath + '/secure/recycleUnit/updateRecycleTime',
    method: 'post',
    data
  })
}

// 检查记录回收站分页
export const examineList: (data: any) => Promise<[]> = (data) => {
  return request({
    url: basePath + '/secure/recycleExamine/find/page',
    method: 'post',
    data
  })
}

// 清空时间
export const examineSelectSet = (data: any) => {
  return request({
    url: basePath + '/secure/recycleExamine/selectSet?pageType='+data.pageType,
    method: 'get'
  })
}

//恢复
export const examineoneRecover = (data: any) => {
  return request({
    url: basePath + '/secure/recycleExamine/oneRecover?id='+data.id + '&isJudeg='+data.isJudeg,
    method: 'get'
  })
}

//清空
export const examineemptyRecover = () => {
  return request({
    url: basePath + '/secure/recycleExamine/emptyRecover',
    method: 'get'
  })
}

// 培训记录回收站分页
export const cultivateList: (data: any) => Promise<[]> = (data) => {
  return request({
    url: basePath + '/secure/recycleCultivate/find/page',
    method: 'post',
    data
  })
}

// 清空时间
export const cultivateSelectSet = (data: any) => {
  return request({
    url: basePath + '/secure/recycleCultivate/selectSet?pageType='+data.pageType,
    method: 'get'
  })
}

//恢复
export const cultivateoneRecover = (data: any) => {
  return request({
    url: basePath + '/secure/recycleCultivate/oneRecover?id='+data.id + '&isJudeg='+data.isJudeg,
    method: 'get'
  })
}

//清空
export const cultivateemptyRecover = () => {
  return request({
    url: basePath + '/secure/recycleCultivate/emptyRecover',
    method: 'get'
  })
}


// 隐患清单回收站分页
export const earlyList: (data: any) => Promise<[]> = (data) => {
  return request({
    url: basePath + '/tcdmSecureHazardListRecycle/findPage',
    method: 'post',
    data
  })
}

// 清空时间
export const earlySelectSet = (data: any) => {
  return request({
    url: basePath + '/secure/recycleEarly/selectSet?pageType='+data.pageType,
    method: 'get'
  })
}

//恢复
export const earlyoneRecover = (data: any) => {
  return request({
    url: basePath + '/secure/recycleEarly/oneRecover?id='+data.id + '&isJudeg='+data.isJudeg,
    method: 'get'
  })
}

//清空
export const earlyemptyRecover = () => {
  return request({
    url: basePath + '/secure/recycleEarly/emptyRecover',
    method: 'get'
  })
}

// 隐患清单回收站分页
export const assessList: (data: any) => Promise<[]> = (data) => {
  return request({
    url: basePath + '/tcdmSecureHazardAssessmentRecycle/findPage',
    method: 'post',
    data
  })
}

// 清空时间
export const assessSelectSet = (data: any) => {
  return request({
    url: basePath + '/secure/recycleAssess/selectSet?pageType='+data.pageType,
    method: 'get'
  })
}

//恢复
export const assessoneRecover = (data: any) => {
  return request({
    url: basePath + '/secure/recycleAssess/oneRecover?id='+data.id + '&isJudeg='+data.isJudeg,
    method: 'get'
  })
}

//清空
export const assessemptyRecover = () => {
  return request({
    url: basePath + '/secure/recycleAssess/emptyRecover',
    method: 'get'
  })
}

// 用户监测分页
export const usersList: (data: any) => Promise<[]> = (data) => {
  return request({
    url: basePath + '/sysMonitor/serMonituor/find/page',
    method: 'post',
    data
  })
}

// 运行监测分页
export const setvList: (data: any) => Promise<[]> = (data) => {
  return request({
    url: basePath + '/sysMonitor/setveMonitor/find/page',
    method: 'post',
    data
  })
}

// 数据库监测分页
export const databaseList: (data: any) => Promise<[]> = (data) => {
  return request({
    url: basePath + '/sysMonitor/databaseMonitor/find/page',
    method: 'post',
    data
  })
}

// 服务监测分页
export const serveList: (data: any) => Promise<[]> = (data) => {
  return request({
    url: basePath + '/sysMonitor/serveMonitor/find/page',
    method: 'post',
    data
  })
}

//当日用户访问总数
export const selectCount = () => {
  return request({
    url: basePath + '/sysMonitor/serMonituor/selectCount',
    method: 'get'
  })
}

//在线用户数
export const selectOnline = () => {
  return request({
    url: basePath + '/sysMonitor/serMonituor/selectOnline',
    method: 'get'
  })
}
// 查询所有外部单位
export const unitList = () => {
  return request({
    url: basePath + '/department/findAll',
    method: 'get'
  })
}



